package net.whzjkj.gateway.tcpserver.processor.command;

import net.whzjkj.gateway.model.vo.PackageData;
import net.whzjkj.gateway.tcpserver.constant.JT808Constant;
import net.whzjkj.gateway.tcpserver.processor.AbstractMessageProcessor;
import org.springframework.stereotype.Component;

import java.io.IOException;

/**
 * @description: 终端心跳包处理
 * @author: Mr.Hu
 * @create: 2018-11-01 08:47
 **/
@Component
public class CMD0001 extends AbstractMessageProcessor {

    @Override
    public void processTerminalMessage(PackageData data) throws InterruptedException, IOException {
        //调用平台统一应答消息
        super.serverCommonRespond(data);
    }

    @Override
    public boolean support(PackageData data) {
        return data.getMessageHeader().getMessageId()== JT808Constant.CMD_COMMON_TERMINAL_RESPOND;
    }
}
